import { myPost } from '@/util/request'
import { API_SERVER } from '../service'

const DEFAULT_API = `${API_SERVER}/v2`

/**
 * @desc MCP列表
 */
export const listMCP = (data) => {
  return myPost(`${DEFAULT_API}/mcp/head/index`, data )
}

/**
 * @desc 新增MCP
 */
 export const createMCP = (data) => {
  return myPost(`${DEFAULT_API}/mcp/head/save`, data )
}

/**
 * @desc 编辑MCP
 */
 export const updateMCP = (data) => {
  return myPost(`${DEFAULT_API}/mcp/head/edit`, data )
}

/**
 * @desc 删除MCP
 */
 export const deleteMCP = (data) => {
  return myPost(`${DEFAULT_API}/mcp/head/delete`, data )
}

/**
 * @desc MCP详情
 */
 export const detailMCP = (data) => {
  return myPost(`${DEFAULT_API}/mcp/head/detail`, data )
}

/**
 * @desc MCP查询工作流-智能体
 */
 export const listAgentflow = (data) => {
  return myPost(`${DEFAULT_API}/mcp/head/find/agentflow`, data )
}
